package org.forex.impl.ws;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import org.forex.api.ws.AbstractHttpCall;
import org.forex.vo.Prices;

public class GetInstrumentPrice extends AbstractHttpCall<Prices> {

	public static Map<String, String> parameters;

	static{
		parameters=new HashMap<String, String>();
		//parameters.put("accountId", "9646994");
		//parameters=Collections.unmodifiableMap(parameters);
	}

	public GetInstrumentPrice() {
		super(Prices.class);
	}

	@Override
	public Map<String, String> getParameters() {
		return parameters;
	}

	public Optional<Prices> get(String instrumentCode) throws IOException{
		parameters.put("instruments", instrumentCode);
		return call("/v1/prices");
	}

	@Override
	public String getHttpMethod() {
		return GET;
	}

}
